Modernize the dashboard UI: light theme, semantic colour tokens, accessibility - #70
Open
rennerdo30 wants to merge 2 commits into
Open
Modernize the dashboard UI: light theme, semantic colour tokens, accessibility#70rennerdo30 wants to merge 2 commits into
rennerdo30 wants to merge 2 commits into
Conversation
Replace fixed palette utilities (violet/emerald/zinc/...) with semantic colour tokens so every surface works on both themes, and add the light theme that the token set implied but never had. - add brand/success/warning/danger/info tokens with per-theme lightness; all pairs clear WCAG AA against the surfaces they are used on - add a light theme plus a header theme toggle; the choice is stored and applied before first paint, defaulting to the OS preference - add a mobile navigation drawer, so the sidebar links are reachable below the lg breakpoint, and share the nav definition with the sidebar - add a locale switcher for the five bundled languages - add a skip link, a main landmark, aria-current on the active nav item, aria-labels on icon-only controls and visible focus rings throughout - honour prefers-reduced-motion; suppress transitions during theme swaps - cap page width and unify page padding, heading scale and card padding - replace loading spinners with skeletons where the shape is known - localise the errors page, give each severity its own tint and make its row actions keyboard reachable - render dashboard dates with next-intl instead of the runtime locale, and stop building "View all" out of two message fragments - point the footer at docs that exist instead of dead /docs and /api
- Go 1.25 and PostgreSQL 17, matching go.mod and the compose stack - list next-intl, Vitest and the theming approach in the frontend stack - add UI development commands and explain the API rewrite target - replace the create-next-app boilerplate in ui/README.md with the actual layout, scripts, theming and i18n conventions
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Focused frontend pass on the Next.js dashboard. No dependency, framework or API changes — same components, same routes.
Theming
brand,success,warning,danger,info— each with its own lightness per theme, and replaced every fixed palette utility (text-violet-400,bg-emerald-500/10,text-zinc-600,bg-black/80, …) with them. Every foreground/surface pair used in the app clears WCAG AA (measured: 4.5–17:1 on both themes, including on the 10% tints the badges use).localStorageand applied before first paint by a small inline script, so there is no flash; with no stored choice the OS preference decides, falling back to dark. Transitions are suppressed during the swap.--muted-foregroundlifted from 55% to 65% lightness (4.3:1 → 7.4:1), and--accentis now a neutral elevation instead of solid violet, which previously produced violet-on-violet hover rows in selects and menus.Navigation and layout
lg(where the sidebar is hidden) no navigation was reachable. The nav definition now lives inlib/nav.tsand is shared by the sidebar and the drawer.text-3xl) and card rhythm are consistent; the errors page no longer double-pads.Accessibility
<main>landmark,aria-current="page"on the active nav item (the active-state CSS now keys off it),aria-label/titleon icon-only controls,aria-hiddenon decorative icons,<time datetime>for timestamps,<nav>/<ul>for the footer links.prefers-reduced-motionis honoured (pulses, pings, hover lifts).Polish and correctness
text-brand hover:text-brand,bg-primary hover:bg-primary) fixed."View all"was assembled fromcommon.view+" All"; it is now one key. The<span>brand markup was missing from the non-Englishdashboard.welcomestrings (anddehad a stray leading "J"), so the highlight only worked in English. Dashboard dates now usenext-intl's formatter instead of the runtime default locale. New keys added to all five bundles.errorvswarningare visually distinct again (both had collapsed to the same tint)./docsand/api, neither of which exists — now points at the docs in this repo.Docs
ui/README.mdwas still create-next-app boilerplate (it even credited a font the app does not use); replaced with the real structure, scripts, theming and i18n conventions.Verification
npx tsc --noEmitclean.npm run buildsucceeds.npm run test:run: 704/713 passing — identical tomain(the 9 failures are pre-existing RadixdisplayNameassertions plus one popover outside-click test). Colour-class assertions in four component tests were updated to the new token classes.npm run lint: the same 2 pre-existing errors asmain(errors/page.tsxsetState-in-effect,file-upload.tsxuse-before-declare), warnings 13 → 12; no new errors introduced and no pre-existing ones fixed. All routes smoke-tested against a production server in all five locales.